package com.example.qw.myapplication8;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {
    private ListView mLv;
    private List<Integer> ints=new ArrayList<>();

    private ArrayAdapter mArrayAdapter;






    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mLv = (ListView) findViewById(R.id.lv);
        getData();
        initAdapter();
        mLv.setAdapter(mArrayAdapter);

    }
//wpsjo1sfsdffdsfsdfsd
    private void getData() {
        for (int i = 0; i < 30; i++) {
            ints.add(i);
        }

    }


    private void initAdapter() {

        mArrayAdapter=new ArrayAdapter(this,android.R.layout.simple_expandable_list_item_1,ints);
    }

}
